package com.project.mapper.goodsOrderInfoMapper;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.project.bean.GoodsOrderBean;
import com.project.bean.GoodsOrderInfoBean;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;
import java.util.List;

public interface IGoodsOrderInfoMapper {
    /**
     * 查看订单详情
     * @param state 状态
     * @param startDate 起始日期
     * @param endDate 结束日期
     * @return
     */
    public List<GoodsOrderInfoBean> findByItem(@Param("state") String state,
                                               @Param("startDate") LocalDate startDate,
                                               @Param("endDate") LocalDate endDate,
                                                @Param("userId") int userId);
    /**
     * 按订单id查询订单详情,并且查询收货信息
     * @param orderId 订单id
     * @return 订单对象
     */
    public List<GoodsOrderInfoBean> findById(int orderId);

    /**
     * 按订单id查询订单,并且查询订单详情信息
     * @param orderInfoId 订单id
     * @return 订单对象
     */
    public GoodsOrderInfoBean findByInfoId(int orderInfoId);

    /**
     * 修改订单详情状态
     * @param orderId  订单ID
     * @param state  订单状态
     */
    public void update(@Param("orderId") int orderId, @Param("state") String state);
}
